#include <bits/stdc++.h>
using namespace std;

int main(){
    int n;
    double max_num;
    while (cin>>n) {
        max_num = -0xffff;
        int arr[n + 5][n + 5];
        int dx[3] = {1, 0, 1};
        int dy[3] = {0, 1, 1};
        for (int i = 1; i <= n; ++i)
            for (int j = 1; j <= n; ++j)
                cin >> arr[i][j];

        for (int i = 1; i < n; ++i)
            for (int j = 1, tmp; j < n; ++j) {
                tmp = arr[i][j];
                for (int k = 0; k < 3; ++k)
                    tmp += arr[i + dx[k]][j + dy[k]];
                max_num = max(max_num, tmp / 4.00);
            }
        printf("%.2f\n", max_num);
    }
    return 0;
}